furny.states
Class InitializerUIController

java.lang.Object
  extended by de.lessvoid.nifty.screen.DefaultScreenController
      extended by furny.states.InitializerUIController
All Implemented Interfaces:
de.lessvoid.nifty.screen.ScreenController, IMenuListenerParent

public class InitializerUIController
extends de.lessvoid.nifty.screen.DefaultScreenController
implements IMenuListenerParent

This is a controller that allows communication with the nifty gui.

Since:
12.08.2012
Author:
Stephan Dreyer

Field Summary
private  IInteractiveFitnessEvaluator<FurnLayoutIndividual> evaluator
           
private  java.util.List<java.lang.String> floorTextures
           
private  MenuListener menuListener
           
private  InitializerPreState state
           
private  com.jme3.math.ColorRGBA wallColor
           
 
Constructor Summary
InitializerUIController(IInteractiveFitnessEvaluator<FurnLayoutIndividual> evaluator, InitializerPreState state)
          Instantiates a new initializer ui controller.
 
Method Summary
private  void addTexture(java.lang.String file)
          Adds a texture.
 de.lessvoid.nifty.tools.Color getColor()
          Gets the wall color.
 java.lang.String getColorString()
          Gets the wall color as string.
 java.lang.String getImageFile(int i)
          Gets the image file at index i.
 FurnLayoutIndividual getIndividual()
          Gets the individual.
 java.lang.String getPopPercentageString()
          Gets the pop percentage string.
 java.lang.String getRoomSizeString()
          Gets the room size as string.
 void onFloorTextureChange(java.lang.String num)
          Callback method.
 void onLightingChange(java.lang.String lightingType)
          Callback method.
 void onLoadIndividual()
          Callback method.
 void onPopPercentageChange()
          Callback method.
 void onResetIndividual()
          Callback method.
 void onRoomSizeChange()
          Callback method.
 void onTerminate()
          Callback method.
 void onWallColorChange(java.lang.String colorString)
          Callback method.
 void onWallColorSelect()
          Callback method.
 void setMenuListener(MenuListener menuListener)
          Sets the menu listener.
 void setWallColor(com.jme3.math.ColorRGBA wallColor)
          Sets the wall color.
 
Methods inherited from class de.lessvoid.nifty.screen.DefaultScreenController
bind, gotoScreen, onEndScreen, onStartScreen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluator

private final IInteractiveFitnessEvaluator<FurnLayoutIndividual> evaluator

state

private final InitializerPreState state

floorTextures

private final java.util.List<java.lang.String> floorTextures

menuListener

private MenuListener menuListener

wallColor

private com.jme3.math.ColorRGBA wallColor
Constructor Detail

InitializerUIController

public InitializerUIController(IInteractiveFitnessEvaluator<FurnLayoutIndividual> evaluator,
                               InitializerPreState state)
Instantiates a new initializer ui controller.

Parameters:
evaluator - the evaluator
state - the state
Since:
12.08.2012
Method Detail

addTexture

private void addTexture(java.lang.String file)
Adds a texture.

Parameters:
file - the filename
Since:
12.08.2012

setWallColor

public void setWallColor(com.jme3.math.ColorRGBA wallColor)
Sets the wall color.

Parameters:
wallColor - the new wall color
Since:
12.08.2012

onTerminate

public void onTerminate()
Callback method. Called from the gui.

Since:
12.08.2012

setMenuListener

public void setMenuListener(MenuListener menuListener)
Description copied from interface: IMenuListenerParent
Sets the menu listener.

Specified by:
setMenuListener in interface IMenuListenerParent
Parameters:
menuListener - the new menu listener

onFloorTextureChange

public void onFloorTextureChange(java.lang.String num)
Callback method. Called from the gui.

Since:
12.08.2012

getRoomSizeString

public java.lang.String getRoomSizeString()
Gets the room size as string.

Returns:
the room size string
Since:
12.08.2012

onPopPercentageChange

public void onPopPercentageChange()
Callback method. Called from the gui.

Since:
12.08.2012

onRoomSizeChange

public void onRoomSizeChange()
Callback method. Called from the gui.

Since:
12.08.2012

getPopPercentageString

public java.lang.String getPopPercentageString()
Gets the pop percentage string.

Returns:
the pop percentage string
Since:
12.08.2012

onWallColorChange

public void onWallColorChange(java.lang.String colorString)
Callback method. Called from the gui.

Parameters:
colorString - The new color as string.
Since:
12.08.2012

onLoadIndividual

public void onLoadIndividual()
Callback method. Called from the gui.

Since:
12.08.2012

getIndividual

public FurnLayoutIndividual getIndividual()
Gets the individual.

Returns:
the individual
Since:
12.08.2012

onResetIndividual

public void onResetIndividual()
Callback method. Called from the gui.

Since:
12.08.2012

onLightingChange

public void onLightingChange(java.lang.String lightingType)
Callback method. Called from the gui.

Parameters:
lightingType - The new type of lighting.
Since:
12.08.2012

onWallColorSelect

public void onWallColorSelect()
Callback method. Called from the gui.

Since:
12.08.2012

getColorString

public java.lang.String getColorString()
Gets the wall color as string.

Returns:
the color string
Since:
12.08.2012

getColor

public de.lessvoid.nifty.tools.Color getColor()
Gets the wall color.

Returns:
the color
Since:
12.08.2012

getImageFile

public java.lang.String getImageFile(int i)
Gets the image file at index i.

Parameters:
i - the index of the image file.
Returns:
the image file
Since:
12.08.2012